// 文件模块
import { request } from "../utils/request";

// 登陆接口
export function login(data) {
  return request("/login", data, "get");
}
// 创建容器
export function add_container(data) {
  return request("/docker/container_create_test", data, "get");
}
//创建集群
export function add_containerCluster(data) {
  return request("/docker/containerCluster_create_test", data, "get");
}
// 扩容
export function change_container_cpu(data) {
  return request("/docker/resource_scheduling/change_CPU", data, "get");
}
// 创建镜像
export function add_image(data){
  return request("/docker/image_management_create_test", data, "get");
}
// 删除镜像
export function del_image(data){
  return request("/image_del", data, "get");
}
// 载荷谱文件传输接口
export function del_container(data) {
  return request("/docker/container_create/destory", data, "get");
}
export function del_containerCluster(data) {
  return request("/docker/containerCluster_create/destory", data, "get");
}
// 查询所有容器
export function find_all_container(data){
  return request("/docker/container_find_all",data,"get");
}
export function find_container(data){
  return request("/docker/container_find",data,"get");
}
//查询所有容器集群
export function find_all_containerCluster(data){
  return request("/docker/containerCluster_find_all",data,"get");
}
//搜索容器集群
export function find_containerCluster(data){
  return request("/docker/containerCluster_find",data,"get");
}
export function find_all_image(data){
  return request("/image/image_get_info",data,"get");
}
// 上传计算 .py 文件
export function upload_calculation_file(data){
  return request("/uploadFile/uploadcalculationFile",data,"post");
}
// // 开始计算 .py 文件
// export function start_calculation_file(data){
//   return request("/uploadFile/startcalculationFile",data,"get");
// }
// 替换文件
export function replace_upload_file(data){
  return request("/uploadFile/replacefile",data,"get");
}
// 删除缓存文件
export function delete_cache_file(data){
  return request("/uploadFile/deletecache",data,"get")
}
// 遍历所有已创建计算的 python 文件夹
export function findAll_calculation_folder(data){
  return request("/uploadFile/findAllculfile",data,"get")
}
// 创建计算
export function create_calculation(data){
  return request("/uploadFile/createCalculation",data,"get")
}
//获取python文件名
export function findAll_python_filename(data){
  return request("/uploadFile/findAllfilename",data,"get")
}
//下载文件
export function download_result_file(data){
  return request("/uploadFile/downloadCalResult",data,"get")
}
//计算创建--编辑文件夹
export function edit_foldername(data){
  return request("/uploadFile/editFoldername",data,"get")
}
//计算创建--删除夹
export function delete_foldername(data){
  return request("/uploadFile/deleteFoldername",data,"get")
}

// 添加获取所有课程
export function getall_course(data){
  return request("/course/getAllCourse",data,"get")
}
// 创建课程
export function create_course(data){
  return request("/course/createCourse",data,"get")
}
// 删除课程
export function delete_course(data){
  return request("/course/deleteCourse",data,"get")
}
// 修改课程
export function edit_course(data){
  return request("/course/editAllCourse",data,"get")
}
